package com.fulihui.usercore.core.processor.auth;

import com.fulihui.usercore.request.auth.AbstractAuthRequest;

/**
 * 授权处理
 * @author Willard.Hu on 2016/11/9 0009.
 */
public interface AuthProcessor {

    /**
     * 判断是否已注册
     * @param loginId 用户登陆账号
     * @return 是否注册
     */
    boolean registered(String loginId);

    /**
     * 注册
     * @param request {@link AbstractAuthRequest}
     * @return userid
     */
    String register(AbstractAuthRequest request);

    /**
     * 登陆
     * @param request {@link AbstractAuthRequest}
     * @return userid
     */
    String login(AbstractAuthRequest request);

}
